﻿using System;
using System.Collections.Generic;
using IInject.Internal;
using IInject.Registration;

namespace IInject.Resolution
{
	public class DefaultPropertyResolver : ContainerMember, IDependencyResolver
	{
		#region Fields

		private IRegistryProvider _registryProvider;

		#endregion

		#region Constructors

		public DefaultPropertyResolver(IContainer container) : base(container)
		{
		}

		#endregion

		#region Properties

		protected IRegistryProvider Registry
		{
			get
			{
				if (_registryProvider == null)
				{
					_registryProvider = Container.Registry;
				}

				return _registryProvider;
			}
		}
	
		#endregion

		#region Methods

		public bool CanResolve(Type type)
		{
			return false;
		}

		public TypeDependency Resolve<T>()
		{
			return Resolve(typeof(T), null);
		}

		public TypeDependency Resolve<T>(string key)
		{
			return Resolve(typeof(T), key);
		}

		public TypeDependency Resolve(Type type)
		{
			return Resolve(type, null);
		}

		public TypeDependency Resolve(Type type, string key)
		{
			return null;//Container.
		}

		public IEnumerable<TypeDependency> ResolveAll<T>()
		{
			return ResolveAll(typeof(T));
		}

		public IEnumerable<TypeDependency> ResolveAll(Type type)
		{
			return null;
		}

		public TypeDependency Build(RegistryContext context)
		{
			return null;
		}

		#endregion
	}
}
